#!/usr/bin/env node

const log=console.log;
const dir=console.dir;
const table= console.table;
const error = console.error;
const me ={
    name:'zen',
    age:18,
    qq:'123456789'
};

log('name:%s',me.name);
log('age:%d',me.age);
log('num:%i',45);      //integer
//log('pi:%f',math.PI); //float
log('user:%j',me);   //json
log('me:%o',me);

log('name: %s', me.name);
log('name:', me.name);
log('name:'+ me.name);
log(`name: ${me.name}`);

//
dir(me);

const users = [me, { name: 'as', age: 20 }, { name: 'bb', age: 22 }];
dir(users);

const deepObject = { a: { b: { c: 1 } } };
dir(deepObject);

table(users);

table(users, ['name', 'age']);

error('Error: something wrong!');

log('This is a log message');
error('This is an error message');